<template>
  <div>
      <div id="map">
      </div>
      <!-- 想要对调成功，@select 很重要，不要用括号接收值 -->
    <MyDropdown :options="options" @select="handleSelectOption"  style="z-index: 1000; position: absolute;left: 10px; bottom: 20px;height: 40px;"/>


  </div>

</template>

<script setup>
import { onMounted, onUnmounted ,reactive} from 'vue'
import * as Sworld from "../plugins/mian"
import MyDropdown from  "./Dropdown.vue"
// export default {
//   name: 'HelloWorld',
//   props: {
//     msg: String
//   },
//   setup(){
const options= reactive([
  { id: 1, label: '选项1' },
  { id: 2, label: '选项2' },
  { id: 3, label: '选项3' },
])
const props=defineProps({
  msg:{
    type:String,
    default:'defparam'
  }
})
const handleSelectOption = (option) =>{
  console.log(option)
}
    onMounted(() => {
      //实例化SworldMap对象
      var sworldmap = new Sworld.SworldMap(null);
      //调用初始化方法
      sworldmap.initMap();
      //将地图类绑定到全局，如果其他地方需要使用就可以只去window中取就可以了
      window.sworldmap = sworldmap;
    });


</script>

<style scoped lang="scss">
#map {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 999;
}
</style>
